<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>子闻轩小工具</title>
    <style>
        body,
        html {
            width: 100%;
            height: 100%;
            padding: 0;
            margin: 0 auto;
            position: relative;
            color: #444;
            background-color: #dddddd;
            overflow: hidden;
        }

        * {
            box-sizing: border-box;
        }

        .layout {
            height: calc(100% - 10px);
            width: calc(100% - 10px);
            margin: 5px auto;
            display: flex;
            flex-direction: column;
            /* position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%); */

        }

        .layout_header {
            display: flex;
            height: 40px;
            /* border-bottom: 2px orangered solid; */
            width: 100%;
            background-color: lightseagreen;
            align-items: center;
            padding-left: 10px;
            color: white;
        }

        .layout_body {
            display: flex;
            flex-direction: column;

            width: 100%;
            height: 100%;
            /* margin: 10px auto; */
            /* position: absolute; */
            /* top: 50%;
            left: 50%;
            transform: translate(-50%, -50%); */
            border: 1px lightseagreen solid;
            padding: 20px;
            background-color: white;

        }


        .my-input {
            width: 200px;
            padding: 4px 10px;
            outline: none;
            border: 1px lightseagreen solid;
        }



        .m-textarea {
            width: 100%;
            padding: 10px;
            outline: none;
            border: 1px lightseagreen solid;

        }

        .m-btn-contianer {
            margin-top: 10px;
            display: flex;
            flex-direction: column;
        }

        .m-btn {
            outline: none;
            border: 1px lightseagreen solid;
            background-color: white;
            padding: 10px 30px;
            cursor: pointer;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .m-btn:disabled {
            background-color: #f2f2f2;
            cursor: not-allowed;
            color: #444;
            border: 1px #f2f2f2 solid;
        }


        .m-btn:hover {
            outline: none;
            border: 1px lightseagreen solid;
            background-color: lightseagreen;
            color: white;
            padding: 10px 30px;
            cursor: pointer;
        }

        .m-btn:disabled:hover {
            background-color: #f2f2f2;
            cursor: not-allowed;
            color: #444;
            border: 1px #f2f2f2 solid;
        }

        .ul_box {
            margin: 0 auto;
            padding: 0;
            list-style: none;
            width: 600px;
        }

        .ul_box>li {
            padding: 10px 10px 0 10px;
            overflow: hidden;
            border-bottom: #e5e5e5 solid 1px;
        }

        .ul_box>li:last-child {
            border-bottom: none;
        }

        .ul_box>li>div {
            float: left;
        }

        .ul_box>li>div:nth-child(1) {
            width: 100px;
        }

        .ul_box>li>div:nth-child(2) {
            width: 480px;
            overflow: hidden;
        }

        .label_box>label {
            display: block;
            float: left;
            margin: 0 10px 10px 0;
            position: relative;
            overflow: hidden;
        }

        .label_box>label>input {
            position: absolute;
            top: 0;
            left: -20px;
        }

        .label_box>label>div {
            width: 120px;
            text-align: center;
            border: #dddddd solid 1px;
            height: 40px;
            line-height: 40px;
            color: #666666;
            user-select: none;
            overflow: hidden;
            position: relative;
        }

        .label_box>label>input:checked+div {
            border: #d51917 solid 1px;
            color: #d51917;
        }

        .label_box>label>input:checked+div:after {
            content: '';
            display: block;
            width: 20px;
            height: 20px;
            background-color: #d51917;
            transform: skewY(-45deg);
            position: absolute;
            bottom: -10px;
            right: 0;
            z-index: 1;
        }

        .label_box>label>input:checked+div:before {
            content: '';
            display: block;
            width: 3px;
            height: 8px;
            border-right: #ffffff solid 2px;
            border-bottom: #ffffff solid 2px;
            transform: rotate(35deg);
            position: absolute;
            bottom: 2px;
            right: 4px;
            z-index: 2;
        }

        .chk_line {
            display: flex;
            flex-direction: row;
            justify-content: flex-start;
            align-content: center;


        }

        .chk_line>div {
            display: flex;
            flex-direction: row;
            justify-content: flex-start;
            align-content: center;
            line-height: 40px;
        }

        .chk_line .chk_line_title {
            font-size: 16px;
            line-height: 40px;
            width: 100px;
        }

        .chk_line .chk_line_content {
            font-size: 16px;
            line-height: 40px;
            flex: 1;
        }

        .log_container {
            margin-top: 10px;
            outline: none;
            border: 1px lightseagreen solid;
            resize: none;
            display: flex;
            flex: 1;
            min-height: 100px;
        }
    </style>
</head>

<body>


    <div class="layout">
        <div class="layout_header">
            爱学习PPT抓取 软件开发: 雪夜惊鸿 18627726186
        </div>



        <div class="layout_body contianer">

            <div style="margin: 10px 0px;">
                <input class="my-input" id="username" placeholder="帐号" /> <input id="password" class="my-input" placeholder="密码" />
            </div>

            <textarea class="m-textarea" id="input-url" rows="10" placeholder="请贴入备课页面地址,英文逗号分隔"></textarea>

            <div class="m-btn-contianer">

                <div class='chk_line'>
                    <div class="label_box">
                        <label>
                            <input type="radio" name="headless" id="headless_1" value="1" checked>
                            <div>默认抓取</div>
                        </label>
                        <label>
                            <input type="radio" name="headless" id="headless_0" value="0">
                            <div>界面抓取</div>
                        </label>
                    </div>
                </div>

                <div class='chk_line'>
                    <div class="label_box">
                        <label>
                            <input type="radio" name="network" id="network_1" value="1" checked>
                            <div>网络好</div>
                        </label>
                        <label>
                            <input type="radio" name="network" id="network_2" value="1.2">
                            <div>网络中</div>
                        </label>
                        <label>
                            <input type="radio" name="network" id="network_3" value="1.5">
                            <div>网络差</div>
                        </label>
                        <label>
                            <input type="radio" name="network" id="network_test" value="0.2">
                            <div>超快测试(勿用)</div>
                        </label>
                    </div>
                </div>

                <div class='chk_line'>
                    <div class="chk_line_content" style="display: flex;flex-direction: row;">
                        <button class="m-btn" id="startDo" style="display: flex;flex:1">
                            开始爬取
                        </button>
                        <button class="m-btn" id="openLessonFolder"
                            style="display: flex;width:200px;margin-left:10px;background-color: lightseagreen; color: white;">
                            打开文件夹
                        </button>

                    </div>
                </div>




            </div>
            <textarea class="log_container" id="log_container"></textarea>
        </div>
    </div>


    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js"></script>
    <script>

        // setInterval(() => {
        //     var log=new Date().getTime();
        //     var lodDom = document.getElementById('log_container');
        //     lodDom.value = lodDom.value + log + '\r\n';

        //     lodDom.scrollTop = lodDom.scrollHeight;
        // }, 400);
        // document.getElementById('startDo').setAttribute('disabled', 'disabled');
        // setTimeout(() => {
        //     document.getElementById('startDo').removeAttribute('disabled')
        // }, 1000);

    </script>

    <script src="./renderer.js"></script>

</body>

</html>